package com.vmladenov.cook;

import java.util.ArrayList;

import android.app.Application;

import com.vmladenov.cook.core.db.AutoUpdate;
import com.vmladenov.cook.core.db.DataHelper;

public class CustomApplication extends Application
{
	private static CustomApplication _instance = null;

	public CustomApplication()
	{
		_instance = this;
	}

	@Override
	public void onCreate()
	{
		super.onCreate();
		_instance.dataHelper = new DataHelper(getApplicationContext());
		AutoUpdate autoUpdate = new AutoUpdate();
		autoUpdate.start();
	}

	public ArrayList<Integer> RecipeIds;

	public int CurrentTheme;
	private DataHelper dataHelper;

	public static synchronized CustomApplication getInstance()
	{
		if (_instance == null)
		{
			_instance = new CustomApplication();
			_instance.CurrentTheme = android.R.style.Theme_Black;
		}
		return _instance;
	}

	public DataHelper getDataHelper()
	{
		return dataHelper;
	}

}
